package com.zr.model;
// Generated 2016-6-19 19:35:13 by Hibernate Tools 3.2.2.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

/**
 * TAuditing generated by hbm2java
 */
@Entity
@Table(name = "t_auditing", catalog = "ld_sys")
public class TAuditing implements java.io.Serializable {

	private Integer aid;
	private String aname;
	private Set<TOrder> TOrders = new HashSet<TOrder>();

	public TAuditing() {
	}

	public TAuditing(String aname, Set<TOrder> TOrders) {
		this.aname = aname;
		this.TOrders = TOrders;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "aid", unique = true, nullable = false)
	public Integer getAid() {
		return this.aid;
	}

	public void setAid(Integer aid) {
		this.aid = aid;
	}

	@Column(name = "aname")
	public String getAname() {
		return this.aname;
	}

	public void setAname(String aname) {
		this.aname = aname;
	}

	@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TAuditings")
	public Set<TOrder> getTOrders() {
		return this.TOrders;
	}

	public void setTOrders(Set<TOrder> TOrders) {
		this.TOrders = TOrders;
	}

}
